package com.tl.sun.manager;

import com.tl.sun.model.UserEnetity;

/**
 * Created by apple on 16/10/15.
 */

public class MDUserMgr {

    private static MDUserMgr instance;

    private int id;
    private String username;
    private String showName;

    private String change;
    private String nickname;
    private String avatar;
    private int status;
    private String phone;
    private String email;
    private String awardFlag;
    private Double money;
    private int time;
    private int sTime;

    private String lastTime;

    private String lastTimeType;

    private boolean threeDayExpire;//三天到期
    private String coupoum;//优惠券号码

    private String token;
    private boolean isLogin;

    private String origin;

    public static MDUserMgr getInstance() {
        if (instance == null) {
            synchronized (MDUserMgr.class) {
                instance = new MDUserMgr();
            }
        }
        return instance;
    }

    public static void setInstance(MDUserMgr instance) {
        MDUserMgr.instance = instance;
    }


    public void setUserInfo(UserEnetity userInfo) {
        this.id = userInfo.getId();
        this.username = userInfo.getUsername();
    }


    public boolean isLogin() {
        return isLogin;
    }

    public void setLogin(boolean login) {
        isLogin = login;
    }

    public boolean getThreeDayExpire() {
        return threeDayExpire;
    }

    public void setThreeDayExpire(boolean threeDayExpire) {
        this.threeDayExpire = threeDayExpire;
    }

    public String getCoupoum() {
        return coupoum;
    }

    public void setCoupoum(String coupoum) {
        this.coupoum = coupoum;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getChange() {
        return change;
    }

    public void setChange(String change) {
        this.change = change;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }



    public String getAwardFlag() {
        return awardFlag;
    }

    public void setAwardFlag(String awardFlag) {
        this.awardFlag = awardFlag;
    }

    public String getLastTime() {
        return lastTime;
    }

    public void setLastTime(String lastTime) {
        this.lastTime = lastTime;
    }

    public String getLastTimeType() {
        return lastTimeType;
    }

    public void setLastTimeType(String lastTimeType) {
        this.lastTimeType = lastTimeType;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public int getsTime() {
        return sTime;
    }

    public void setsTime(int sTime) {
        this.sTime = sTime;
    }

    public String getOrigin() {
        return origin == null ? "" : origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getShowName() {
        return showName == null ? "" : showName;
    }

    public void setShowName(String showName) {
        this.showName = showName;
    }
}
